<?php
interface Lead_EDO_Handler_Interface
{
        
    
	
	/**
	 * Defines type, initializes, fetches and returns an EDO object.
	 *
	 * @param integer $id id
	 * @return Lead_EDO_Object_Abstract
	 */
	public function fetch($id);
	
	
	/**
	 * Converts EDO's typeid to name or vice versa.
	 *
	 * @param mixed $edo_type
	 * @return string|integer
	 */
	public function convert($edo_type);
	


	/**
	 * Returns an EDO of a specified type
	 *
	 * @param mix $edo_type EDO type (name or typeid)
	 * @return Lead_EDO_Object_Abstract 
	 */
	public function get($edo_type);
	
	
	/**
	 * Returns an EDO collection
	 *
	 * @param mixed $objectType EDO object typeid or name
	 * @param array $keys an array of ids
	 * @param string $collectionType Collection type (basic, paged)
	 * @return EDO_collection
	 */
	public function collection($objectType, $keys = array(), $collectionType = 'basic');
	
	/**
	 * Returns an array of dynamic types
	 *
	 * @return Array
	 */
	public function getDynamicTypes();


	/**
	 * Returns an array of all registred types. 
	 * Array format $arr[(int)typeid] = array(class=>string,dynamic=>boolean)
	 *
	 * @return Array
	 */
	public function getTypes();
	

		
	public function insert(Lead_EDO_Object_Abstract $obj, $clear = true);
	
	public function save(Lead_EDO_Object_Abstract $obj);
	
	public function delete(Lead_EDO_Object_Abstract $obj);
	
	
	public function getAttribute($key, $defaultValue = null);
	
	public function setAttribute($key, $value);
	
	public function getAttributes();
	
	
}
?>